// Copyright (c) 2024, lanlian and contributors
// For license information, please see license.txt

frappe.ui.form.on("EMS Equipment Card", {
	refresh(frm) {
        // 从设备卡片下推生成故障报修
        frm.add_custom_button(__('Make EMS Fault Report'), () => {
            console.log(123)
            frappe.model.open_mapped_doc({
                method: "ems.equipment_managerment_system.doctype.ems_equipment_card.ems_equipment_card.make_fault_report",
                frm: cur_frm,
                freeze_message: __("Creating Fault Report ...")
            });
        });
    },
});
